local skel = fk.CreateSkill {
  name = "emo__bingren",
  tags = {Skill.Compulsory},
}

Fk:loadTranslationTable{
  ["emo__bingren"] = "冰刃",
  [":emo__bingren"] = "锁定技，当你使用伤害牌时，若你本阶段未使用过非伤害牌，此牌无法响应且不计入次数。你的普通【杀】视为冰【杀】。",
}

skel:addEffect(fk.PreCardUse, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    if target == player and player:hasSkill(skel.name) and data.card.is_damage_card then
      return #player.room.logic:getEventsOfScope(GameEvent.UseCard, 1, function(e)
        local use = e.data
        return use.from == player.id and not use.card.is_damage_card
      end, Player.HistoryPhase) == 0
    end
  end,
  on_use = function (self, event, target, player, data)
    data.extraUse = true
    data.disresponsiveList = table.simpleClone(player.room.players)
  end,
})

skel:addEffect("filter", {
  card_filter = function (self, card, player)
    return player:hasSkill(skel.name) and card.name == "slash" and table.contains(player.player_cards[Player.Hand], card.id)
  end,
  view_as = function (self, player, card)
    local c = Fk:cloneCard("ice__slash", card.suit, card.number)
    c.skillName = skel.name
    return c
  end,
})

return skel
